
// Fonts
@import url(//fonts.css.network/css?family=Open+Sans);

// Variables
@import "variables";

// Bootstrap
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
@import "node_modules/ag-grid/dist/styles/ag-grid";
@import "node_modules/ag-grid/dist/styles/theme-bootstrap";



// Basic
@import "resources/assets/sass/basic";
@import "resources/assets/sass/appalert";


:focus {
  outline:none;
}

.ag-cell {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.content-wrapper .content {
  min-height: 600px;
}


.modal {
  text-align: center;
  padding: 0!important;

  &:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -4px;
  }

  &.modal-full:before {
    height: 0;
    display: none;;
  }

  .modal-dialog {
    display: inline-block;
    text-align: left;
    vertical-align: middle;
  }

  &.modal-full {
    text-align: left;
    .modal-dialog {
      display: block;
      margin:52px 0px 0px 230px;
      width: auto;
      height: calc(100% - 52px);
    }

    .modal-content {
      height: 100%;
    }

    .modal-body {
      height: calc(100% - 28px - 71px);
      overflow: auto;
    }
  }

  &.modal-full.modal-nofooter {
    .modal-body {
      height: calc(100% - 28px);
    }
  }
}

.sidebar-collapse {
  .modal-full {
    .modal-dialog {
      margin-left: 50px;
    }
  }
}



@mixin app-button-variant($font-color, $bg-color, $border-color) {
  @include button-variant($font-color, $bg-color, $border-color);

  &.btn-sm {
    font-size: 13px;
  }
}

//buttons
.guxy-app {
  .guxy-title {

    b:first-child {
      margin-right: 40px;
    }

    button {
      margin-top: -5px;
    }
  }

  a {
    cursor: pointer;
  }

  .btn-app-red {
    @include app-button-variant($app-color-white, $app-color-red, $app-color-red);
  }
  .btn-app-orange {
    @include app-button-variant($app-color-white, $app-color-orange, $app-color-orange);
  }
  .btn-app-yellow {
    @include app-button-variant($app-color-white, $app-color-yellow, $app-color-yellow);
  }
  .btn-app-white {
    @include app-button-variant($app-text-color-main, $app-color-white, $app-color-gray);
  }
  .btn-app-gray {
    @include app-button-variant($app-text-color-main, $app-color-light-gray, $app-color-gray);
  }
  .btn-app-blue {
    @include app-button-variant($app-color-white, $app-color-blue, $app-color-dark-blue);
  }
  .btn-app-transparent {
    @include app-button-variant(inherit, transparent, transparent);
  }

  .btn-app-large {
    min-width: 100px;
  }
  .btn-app-mid {
    min-width: 70px;
  }
}

//modals
.guxy-app {
  .modal-content {
    border-radius: 7px;
    overflow: hidden;
  }

  .app-modal-default-ok {
    @include app-button-variant($app-color-white, $app-color-orange, $app-color-orange);

  }
  .app-modal-default-cancel {
    @include app-button-variant($app-text-color-main, $app-color-white, $app-color-gray);
  }

  .modal-footer {
    text-align: center;
    border-top: none;
  }
  .modal-header {
    background: $app-color-blue;
    padding: 5px 10px;
    color: white;

    h4.modal-title {
      font-size: 16px;
    }

    button.close {
      display: inline-block;
      position: absolute;
      right: 0;
      padding: 7px 10px;
      margin-top: -7px;
      color: white;
      opacity: 0.8;

      &:hover {
        opacity: 1;
      }
    }
  }

  .modal-body {
    padding: 10px;
  }

  #app-alert {

    .modal-header {
      background: $app-color-lighter-gray;
      color: $app-text-color-main;
    }

    .app-alert-content-wrapper {
      text-align: center;
    }
    .app-alert-icon {
      color: $app-color-orange;
      display: inline-block;
      margin: 0px;
      font-size: 50px;
    }

    button.close {
      color: $app-text-color-main;
    }

    .app-modal-default-ok {
      @include app-button-variant($app-color-white, $app-color-blue, $app-color-dark-blue);
    }

    .app-alert-content {
      margin-top:10px;
    }
  }
}

//search-bar
.guxy-app {

  .search-bar {
    position: relative;
  }
  .search-bar .fa-search {
    background-color: $app-light-blue;
    border-radius: 5px;
    height: 30px;
    width: 30px;
    text-align: center;
    line-height: 30px;
    color: $app-color-white;
    position: absolute;
  }
  .search-bar .sb-dropdown {
    border-radius: 5px;
    height: 30px;
    width: 30px;
    text-align: center;
    line-height: 30px;
    position: absolute;
    right: 0px;
  }

  .search-bar input.main-search {
    border-radius: 5px;
    border: solid 1px $app-color-light-gray;
    height: 30px;
    line-height: 30px;
    padding-left: 35px;
    padding-right: 35px;
    width: 100%;

  }

  .search-bar .advance-search {
    display: none;
    border: solid 1px $app-color-light-gray;
    margin-top: -1px;
    background: $app-color-white;
    padding: 10px;
    border-radius: 5px;
    top:30px;
    position: absolute;
    z-index: 100;
    right:0;
    left: 0;
  }

  .search-bar .advance-submit {
    text-align: right;
  }

  .search-bar .sb-filters {
    list-style: none;
    padding: 0px;
    margin: 0px;
    text-align: right;
  }

  .search-bar .sb-filters li {
    position: relative;
    list-style: none;
    padding: 3px 5px;
    margin: 5px;
    text-align: center;
    display: inline-block;
    border: solid 1px $app-color-light-gray;
    border-radius: 3px;
    background: $app-color-white;

    font-size: 11px;
    line-height: 16px;
    height: 24px;
    padding-right: 18px;

    cursor: pointer;

    .filter-label {
      display: inline-block;
      max-width: 80px;
      white-space: nowrap;
      overflow: hidden;
    }

    .filter-val {
      display: inline-block;
      max-width: 80px;
      white-space: nowrap;
      overflow: hidden;
    }

    >i {
      font-family: FontAwesome;
      font-style: normal;
      font-size: 11px;
      position: absolute;
      right: 5px;
    }

    &:nth-last-child(-n+1) {
      margin-right: 0px;
    }
  }
}

//flex-table
.guxy-app {
  .guxy-panel {
    padding: 10px;
  }


  .content-wrapper {
    background-color: $app-color-lighter-gray;
    color: $app-text-color-main;
  }

  $flex-table-header-color: #eceff4;
  $flex-table-border-color: #dfdfe1;

  .flex-table-wrapper {
    border: solid 1px $flex-table-border-color;
    border-top: none;
  }

  .flex-table {
    min-height: 250px;

    .ag-header {
      line-height: 2.2;
      border-top: solid 2px #424d5e;
      background-color: $flex-table-header-color;
      border-bottom: solid 1px $flex-table-border-color;
    }

    .ag-header-cell {
      border-right: solid 1px $flex-table-border-color;
    }

    .ag-row {
      line-height: 2.2;
      border-bottom: solid 1px $flex-table-border-color;
    }

    .ag-header-cell-menu-button {
      margin-right: 2px;
      margin-top: 8px;

      &:hover {
        border: solid 1px transparent;
      }
    }

    .ag-row-sel-all {
      padding-top: 3px;
      padding-right: 1px;
      display: inline-block;
    }

    .ag-header-select-all {
      padding-top: 13px;
      padding-left: 12px;
      display: inline-block;
    }

    .ag-paging-panel {
      display: none;
    }

  }


  .flex-table-pager {
    height: 45px;
    line-height: 30px;

    .dropup button,.dropdown button {
      margin-top: -3px;
    }
  }
}

// Blocks
.guxy-app {
  .block1 {
    .block-title {
      margin: 0px;
      line-height: 2.7;
      background-color: #eceff4;
      border: solid 1px #dfdfe1;
      border-top: solid 2px #424d5e;
      border-bottom: none;
      text-align: center;
      height: 40px;
    }
    .block-content {
      margin: 0px;
      background-color: #eceff4;
      border: solid 1px #dfdfe1;
    }
  }
}

// Validations
.guxy-app {
  .tooltip {
    margin-right: 15px;
    display: none !important;
  }

  .has-error {
    .tooltip.in {
      display: block !important;
    }
  }

  .toggle.btn-xs {
    min-width: 42px;
  }
}

//Form
.guxy-app {
  .aciTree label {
    margin-bottom: 0px;
    font-weight: normal;
  }
}

// Dropdown
.guxy-app {
  .dropdown-submenu {
    position:relative;
  }
  .dropdown-submenu>.dropdown-menu {
    top:0;
    left:100%;
    margin-top:-6px;
    margin-left:-1px;
    -webkit-border-radius:0 6px 6px 6px;
    -moz-border-radius:0 6px 6px 6px;
    border-radius:0 6px 6px 6px;
  }
  .dropdown-submenu:hover>.dropdown-menu {
    display:block;
  }
  .dropdown-submenu>a:after {
    display:block;
    content:" ";
    float:right;
    width:0;
    height:0;
    border-color:transparent;
    border-style:solid;
    border-width:5px 0 5px 5px;
    border-left-color:#cccccc;
    margin-top:5px;
    margin-right:-10px;
  }
  .dropdown-submenu:hover>a:after {
    border-left-color:#ffffff;
  }
  .dropdown-submenu.pull-left {
    float:none;
  }
  .dropdown-submenu.pull-left>.dropdown-menu {
    left:-100%;
    margin-left:10px;
    -webkit-border-radius:6px 0 6px 6px;
    -moz-border-radius:6px 0 6px 6px;
    border-radius:6px 0 6px 6px;
  }
}

// Drag and Drop
.guxy-app {
  .dnd-table {
    tr .dnd-drag-handle-wrapper {
      color: #cccccc;
      cursor: move;
    }
    tr .dnd-drag-handle {
      visibility: hidden;
      margin: -8px;
      padding: 8px;
    }

    tr:hover .dnd-drag-handle, .tDnD_whileDrag .dnd-drag-handle {
      visibility: visible;
    }
  }
}

// Edit Field
.guxy-app {

  .edit-field {
    display: inline-block;
    width: 100%;
    height: 100%;

    .default-value-editor {
      border: none;
      background: transparent;

      &:focus {
        outline: none;
      }
    }

    .value-editor {
      display: none;
    }

    &.edit-field-hover:after {
      content: '\f044';
      font-family: FontAwesome;
    }



    &.edit-field-editable {
      .value-placeholder-wrapper {
        display: none;
      }
      .value-editor {
        display: inline-block;
      }

      &.edit-field-hover:after {
        content: '';
      }
    }
  }

}


// Others
.guxy-app {
  .app-hover-toolbar {
    display: none;
  }

  .app-hover-toolbar-wrapper:hover {
    .app-hover-toolbar {
      display: inline-block;
    }
  }

  .aciTree.aciTreeLoad {
    background: none;
  }
  .aciTree .aciTreePush>span {
    background: none;
  }
}
